import LayoutMain from '@/layout';
import setting from '@/setting';

const meta = {
    auth: true,
};

const pre = 'setting_';

export default {
    path: '/setting',
    name: 'setting',
    header: 'setting',
    redirect: {
        name: `${pre}setSystem`,
    },
    component: LayoutMain,
    children: [{
            path: 'system_role/index',
            name: `${pre}systemRole`,
            meta: {
                auth: ['setting-system-role'],
                title: '身份管理',
            },
            component: () =>
                import ('@/pages/setting/systemRole/index'),
        },
        {
            path: 'system_admin/index',
            name: `${pre}systemAdmin`,
            meta: {
                auth: ['setting-system-list'],
                title: '管理员列表',
            },
            component: () =>
                import ('@/pages/setting/systemAdmin/index'),
        },
        {
            path: 'system_menus/index',
            name: `${pre}systemMenus`,
            meta: {
                auth: ['setting-system-menus'],
                title: '权限规则',
            },
            component: () =>
                import ('@/pages/setting/systemMenus/index'),
        },
        {
            path: 'system_config',
            name: `${pre}setSystem`,
            meta: {
                auth: ['setting-system-config'],
                title: '系统设置',
            },
            component: () =>
                import ('@/pages/setting/setSystem/index'),
        },
        {
            path: 'system_config/:type?/:tab_id?',
            name: `${pre}setApp`,
            meta: {
                title: '系统设置',
            },
            component: () =>
                import ('@/pages/setting/setSystem/index'),
        },
        {
            path: 'lang/list',
            name: `${pre}langList`,
            meta: {
                auth: ['admin-lang-list'],
                title: '语言列表',
            },
            component: () =>
                import ('@/pages/setting/multiLanguage/list'),
        },
        {
            path: 'lang/info',
            name: `${pre}langInfo`,
            meta: {
                auth: ['admin-lang-info'],
                title: '语言详情',
            },
            component: () =>
                import ('@/pages/setting/multiLanguage/langList'),
        },
        {
            path: 'lang/country',
            name: `${pre}langCountry`,
            meta: {
                auth: ['admin-lang-country'],
                title: '地区关联语言',
            },
            component: () =>
                import ('@/pages/setting/multiLanguage/country'),
        },
        {
            path: 'lang_config/:type?/:tab_id?',
            name: `${pre}lang_config`,
            meta: {
                ...meta,
                title: '翻译配置',
            },
            component: () =>
                import ('@/pages/setting/setSystem/index'),
        },
    ],
};